<template>
  <div class="dbzyDetail">
    <el-dialog
      title="详情"
      :visible.sync="centerDialogVisible"
      width="75%"
      :close-on-click-modal="false"
      :modal-append-to-body="false"
      :before-close="close"
      class="dialog"

      >
      <div style="max-width:1000px;margin:auto;">
    <h4>申请信息</h4>
    <table class="table" border="1" rules="all">
      <tr>
        <td>申请时间</td>
        <td>{{detailForm.receiveDate}}</td>
        <td>申请人</td>
        <td>{{detailForm.receiveUserName}}</td>
      </tr>
      <tr>
        <td>调入部门</td>
        <td colspan="3">{{detailForm.receiveDeptName}}</td>
      </tr>
      <tr>
        <td>备注</td>
        <td colspan="3">{{detailForm.remark}}</td>
      </tr>
    </table>
    <h4>调拨信息</h4>
    <el-table :data="detailForm.deviceParticularListVos" border>
      <el-table-column align="center" type="index" label="序号" width="55"/>
      <el-table-column align="center" label="设备编号" prop="deviceCode"/>
      <el-table-column align="center" label="设备名称" prop="deviceName"/>
      <el-table-column align="center" label="规格型号" prop="deviceModel"/>
      <!-- <el-table-column align="center" label="调出部门" prop="transferDeptDetail"/> -->
      <el-table-column align="center" label="调出地点" prop="transferSiteName"/>
      <el-table-column align="center" label="调入地点" prop="receiveSiteName"/>
      <!-- <el-table-column align="center" label="变更责任人" prop="chargePersonName"/> -->
    </el-table>
      </div>
    </el-dialog>
  </div>
</template>

<script>
  import request from '@/utils/request'
  export default {
    name: "dbzyDetail.vue",
    props:['pid'],
    data() {
      return {
        detailForm: {
          applyTime:'',
          createByName:'',
          deptName:'',
          remark:'',
          allotDetailListVoList:[]
        },
        idDl:'',
        centerDialogVisible:true,
      }
    },
    created() {
      this.idDl = this.pid
      this.getTaskList()
    },
    methods: {
      getTaskList() {
        request({
          url: '/device-allot-api/' + this.idDl,
          method: 'get',
        }).then(response => {
          this.detailForm = response.data

        });

      },
      close(){
        this.$emit('subSetChane')
      }
    }
  }
</script>
<style scoped lang="scss">
  .dbzyDetail {
    .dialog >>> .el-dialog__body{
      height: 85vh;
      overflow: scroll;
    }
    margin-left:20px;
    h4 {
      color: #05A380;
    }
    .table {
      width:900px;
      border: 1px solid #cccccc;
      color: #606266;
      font-size: inherit;
      .height {
        height: 120px;
      }

      tr {
        td:nth-child(2n-1) {
          width: 20%;
          text-align: center;
        }

        td:nth-child(2n) {
          width: 30%;
          padding-left: 10px;
        }

        td {
          line-height: 35px;

          .red {
            color: red;
          }
        }
      }
    }
  }
</style>
